package com.anc.redis.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author Anc
 * on 2022/7/01
 */
@Data
@Component
//@ConfigurationProperties
public class JedisConfig {
   // @Value("${spring.redis.host}")
    public String host="localhost";
   // @Value("${spring.redis.port}")
    public int port=6379;
   // @Value("${spring.redis.database}")
    public int database=0;
    //@Value("${spring.redis.jedis.pool.max-idle}")
    public int maxIdle=50;
    //@Value("${spring.redis.jedis.pool.min-idle}")
    public int minIdle=50;
   // @Value("${spring.redis.jedis.pool.max-active}")
    public int maxActive=200;
   // @Value("${spring.redis.jedis.pool.max-wait}")
    public String maxWait="1000ms";
    //@Value("${spring.redis.timeout}")
    public String timeout="3000ms";
    //@Value("${spring.redis.password:}")
    public String password;
}